﻿using System;
using System.Net;
using System.ServiceModel;

namespace Lypshare.Net.Server.Service
{
	/// <summary>
	/// I access service callback.
	/// </summary>
    public interface IAccessServiceCallback
    {
        // --------------------------------------------------------
        // Interface Functions
        // --------------------------------------------------------


		/// <summary>
		/// Begins the join callback.
		/// </summary>
		/// <param name='clientId'>
		/// Client identifier.
		/// </param>
		/// <param name='address'>
		/// Address.
		/// </param>
        [OperationContract(IsOneWay = true)]
        void BeginJoinCallback(int clientId, IPAddress address);


        /// <summary>
        /// Ends the join callback.
        /// </summary>
        /// <param name='clientId'>
        /// Client identifier.
        /// </param>
        [OperationContract(IsOneWay = true)]
        void EndJoinCallback(int clientId);


        /// <summary>
        /// Disconnects the callback.
        /// </summary>
        /// <param name='clientId'>
        /// Client identifier.
        /// </param>
        [OperationContract(IsOneWay = true)]
        void DisconnectCallback(int clientId);


   		/// <summary>
   		/// Syncronizes the callback.
   		/// </summary>
   		/// <returns>
   		/// The callback.
   		/// </returns>
   		/// <param name='clientId'>
   		/// Client identifier.
   		/// </param>
   		/// <param name='port'>
   		/// Port.
   		/// </param>
        [OperationContract]
        int SyncronizeCallback(int clientId, int port);
		
    } // interface IAccessServiceCallback
} // namespace Lypshare.Net.Server.Service